home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / poptxt.zip / SCREENIO.DOC < prev    next >
Text File  |  1993-04-18  |  2KB  |  77 lines

  1. Unit ScreenIO;
  2.  
  3. {***********************************************}
  4. {**** Unit Screenio                         ****}
  5. {**** Extra Goodies For Unit CRT            ****}
  6. {**** (C) 1989 Tone Zone Computing          ****}
  7. {***********************************************}
  8.  
  9. Interface
  10. Uses Dos,Crt;
  11.  
  12. Const T:Byte = 7;
  13.       C=1;
  14.  
  15.       NoBorder   = 0;     {Passed to Swindow to determine the border}
  16.       Bars       = 1;
  17.       DoubleBars = 2;
  18.       Solid      = 3;
  19.       ThinSolid  = 4;
  20.       Dots       = 5;
  21.       Dense      = 6;
  22.       Pack       = 7;
  23.  
  24.       Normal:Byte = 7;
  25.       CursorOffFlag:Boolean = False;
  26.  
  27. Var ScanCode:Byte;
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34. {*****************************************************************}
  35. {****** Replacement procedures for  CRT                      *****}
  36. {*****************************************************************}
  37.  
  38. Function KeyPressed:Boolean; {Determines if a key is waiting.}
  39. Function Inkey:Char;         {Reads a key without display}
  40. Function KeyScan:Char;       {Reads a key, only if a key is waiting}
  41.  
  42. {If Inkey returns a 0 - then the character is an Extended character,
  43.  The scancode is stored in the byte variable ScanCode;}
  44.  
  45. {KeyScan reads a key only if a key is waiting.  If there is no key in
  46. the buffer, it returns a #255}
  47.  
  48. {*****************************************************************}
  49. {****************** Extra Goodies ********************************}
  50. {*****************************************************************}
  51.  
  52. Function Sread(LocX,LocY,Colo:Byte):Byte;
  53. {Returns the contents of screen Location LocX,LocY.  If you want the
  54. text contents, use Colo=0, for the attribute, use Colo:=1;}
  55.  
  56. Procedure Swrite(LocX,LocY,Colo,What:Byte);
  57. {Writes a character directly to the screen.  Uses The attribute Colo.
  58.  Writes the character chr(What)}
  59.  
  60. Procedure SWindow(X1,Y1,X2,Y2,Border:Byte);
  61. {Places a window on the with coordinates X1,Y1,X2,Y2 and border definition
  62. as determined with above constants.  If border <>Noborder then the actual
  63. text window will be X1+1,Y1+1,X2-1,Y2-1}
  64.  
  65. Function Calculate_Offset(Lox,Loy,Clo:Byte):Integer;
  66.  
  67. Procedure CursorOn;     {Turn the Cursor on}
  68. {Turns the Bios cursor off}
  69.  
  70. Procedure CursorOff;    {Turn the Cursor off}
  71. {Turns the Bios cursor on.}
  72.  
  73. implementation
  74.  
  75.  
  76.  
  77.